<!--The whole content below can be removed with the new code.-->

<ul class="heroes">
    <li *ngFor="let hero of heroes" (click)="onSelect(hero)" [class.selected]="hero === selectedHero">
        <span class="badge">{{hero.id}}</span>
		<span>{{hero.name}}</span>
		<button class="delete"
 				(click)="delete(hero); $event.stopPropagation()">x</button>
    </li>
</ul>

<div *ngIf="selectedHero">
    <h2>英雄： {{selectedHero.name | uppercase}}</h2>

    <button (click)="goDetail()">查看详情</button>
</div>

<div>
    <label>英雄名字:</label> <input #heroName />
    <button (click)="add(heroName.value); heroName.value=''">
    新增
  </button>
</div>
